package project.servlets.redirects;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Servlet implementation class Redirect_k
 */
@WebServlet("/Redirect_k")
public class Redirect_k extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	HttpSession s;
    /**
     * @see HttpServlet#HttpServlet()
     */
    public Redirect_k() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see Servlet#destroy()
	 */
	public void destroy() {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		s = request.getSession();
		s.setAttribute("temp", 1);
		response.sendRedirect("Panel/Panel.jsp");
	}

}
